@extends('default.layouts.adminPublic')
@section('title', '岗位模板')
@section('headcss')
    @parent
    <link rel="stylesheet" href="{{asset('/default/css/admin/indexList.css')}}">
    <link rel="stylesheet" href="{{asset('/default/css/admin/jobTemplate.css')}}">
    @endsection
    @section('content')
            <!--导航开始-->
    <div class="crumb_warp">
        <i class="fa fa-home"></i> <a href="{{url('admin')}}">首页</a> &raquo; 岗位模板管理
    </div>
    <!--导航结束-->
    <!--列表开始-->

    <div class="result_wrap">
        <div class="result_title">
            <h3>岗位模板列表 <em class="red">{{ session("message") }}</em></h3>
            @include('flash::message')
        </div>
        <!--快捷导航 开始-->
        <div class="result_content">
            <div class="short_wrap">
                <a href="{{ url('admin/job_template/') }}"><i class="fa fa-mail-reply"></i>岗位模板管理</a>
                <a href="{{ url('admin/job_template/create') }}"><i class="fa fa-plus"></i>添加岗位模板</a>
            </div>
        </div>
        <div class="con">
            <div class="conMain">
                <div class="manage" style="padding: 0; margin-bottom: 10px;">
                    @if(count($errors)>0)
                        <div class="mark">
                            @if(is_object($errors))
                                @foreach($errors->all() as $error)
                                    <p>{{$error}}</p>
                                @endforeach
                            @else
                                <p>{{$errors}}</p>
                            @endif
                        </div>
                    @endif
                </div>
            </div>
        </div>
    </div>
    <!--快捷导航 结束-->
    <form action="{{ url('/admin/job_template') }}" method="post" onsubmit="return checkForm('#jobTemplateForm')"
          name="jobFairForm" id="jobTemplateForm">
        <div class="result_wrap border_buttom">
            {{csrf_field()}}
            <ul class="list_tab make">
                <li class="create-li">
                    <span class="left"><em>*</em>岗位模板名称：</span>
                    <span class="right">
                        <input type="text" style="width:300px;" name="job_name" value="{{ old('job_name') }}">
                    </span>
                    <span>注：岗位名称必须填写</span>
                </li>
                <li class="create-li">
                    <span class="left"><em>*</em>岗位类别名称：</span>
                    <input name="jobsort1" type="hidden" id="jobsort1" value="{{ old('jobsort1') }}">
                    <input name="jobsort2" type="hidden" id="jobsort2" value="{{ old('jobsort2') }}">
                    <input name="jobsort3" type="hidden" id="jobsort3" value="{{ old('jobsort3') }}">
                    <input name="jobsort4" type="hidden" id="jobsort4" value="{{ old('jobsort4') }}">
                    <input name="jobsort5" type="hidden" id="jobsort5" value="{{ old('jobsort5') }}">
                     <span class="jList" id="posCateInput">
                        <input type="text" name="jobsort" id="jobsort" value="{{ old('jobsort')}}" readonly style="cursor: text; width:400px;"
                               placeholder="请选择工作岗位"/>
                        <i></i>
                     </span>
                    <span class="notice">注：第一个岗位类别很重要，请谨慎选择</span>
                </li>
            </ul>
            <div class="attend">
                <div class="left"><em>*</em>岗位模板描述：</div>
                <div class="rcontent"><textarea name="description">{{ old('description') }}</textarea></div>
            </div>

            <div class="news-submit">
                <div class="submit-right">
                    <input type="submit" value="提 交">
                    <input type="button" class="back" onclick="history.go(-1)" value="返回">
                </div>
            </div>
        </div>
    </form>
@endsection

@section('footerjs')
    @parent
    {{--工作岗位--}}
    <script type="text/javascript" src="{{asset('/default/js/jquery/jquery.position.js')}}"></script>
    <script type="text/javascript">
        $('#jobTemplateForm').find("#posCateInput").click(function(){
            posCateInput('');
        });
    </script>
@endsection